#pragma once

#include <chrono>
#include <iostream>

// Utility class for timing
class Timer {
public:
    // Start or restart the timer
    void start() {
        start_ = std::chrono::high_resolution_clock::now();
    }

    // Get the elapsed time in milliseconds since the timer was started
    long long elapsedMilliseconds() const {
        auto endTime = std::chrono::high_resolution_clock::now();
        return std::chrono::duration_cast<std::chrono::milliseconds>(endTime - start_).count();
    }

private:
    std::chrono::time_point<std::chrono::high_resolution_clock> start_;
};
